<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    终止Promise链条主要就是需要返回一个pending状态的Promise
    <script>
        new Promise((resolve,reject)=>{
            resolve(1)
        }).then(value => {
            console.log(2);            
        }).then(value => {
            console.log(3);
            return new Promise(()=>{})          
        }).then(value => {
            console.log(4);
        }).then(value => {
            console.log(5);   
        }).catch(reason=>{
            console.log(reason);
        })
    </script>
</body>
</html>